package com.example.springboot.service;

import com.example.springboot.entity.Outstore;
import com.example.springboot.mapper.OutstoreMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OutstoreService {
    @Autowired
    private OutstoreMapper outstoreMapper;

    public int save(Outstore outstore){
        if(outstore.getId()==null){
            return outstoreMapper.insert(outstore);
        }else{
            return outstoreMapper.update(outstore);
        }
    }
}
